<?php
$list_tour=$this->tours;

?>

<?php
    //tao doi tuong cua place model
    $place_model=new Admin_Model_Place();
    $list_place=$place_model->listPlace();
    $tour_model=new Default_Model_Tour();
    //$list_tour=$tour_model->listTour();
    
    ?>


<table>
            <tr class="head_table_tour">
                <td class="td_table_tour" style="width: 310px;">Tên tour</td>
                <td class="td_table_tour" style="width: 155px;">Điểm bắt đầu</td>
                <td class="td_table_tour" style="width: 155px;">Điểm Đến</td>
                <td class="td_table_tour" style="width: 120px; text-align: center;">Ngày Đi</td>
                <td class="td_table_tour" style="width: 120px;">Ngày Về</td>
                <td class="td_table_tour" style="width: 120px;" ></td>
                <td class="td_table_tour" style="width: 100px;"></td>
            </tr>
            
            <?php
            foreach($list_tour as $tour):
            
            ?>
            <tr style="height: 30px;">
                <td><a style="color: blue;" href="<?php  echo $this->baseUrl("tour/details?id=".$tour['tour_id']);?>"></a> <?php  echo $tour['tour_name']; ?></td>
                
            
                <td><?php echo $place_model->getPlaceNameById($tour['start_place']); ?></td>
                <?php //echo $tour['start_place'];die(); ?>
                <td><?php echo $place_model->getPlaceNameById($tour['finish_place']); ?></td>
                <td><?php echo $tour['start_date']; ?></td>
                <td><?php echo $tour['finish_date'];?></td>
                <td><a href="<?php echo $this->baseUrl("tour/details?tour_id=".$tour['tour_id']); ?>">Xem Chi Tiết</a></td>
                <td><a href="<?php echo $this->baseUrl('tour/book?tour_id='.$tour['tour_id']) ?>">Đặt Tour</a></td>
            </tr>
            
            <?php endforeach; ?>
            
        </table>


